<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../include/head.jspf"%>  

<head>
<title>东方易云后台管理系统</title>
<script>
function eidtUserInfo(){
	var errorMsg = "";
	if(isNull($("#loginId").val())){
		errorMsg += '<spring:message code="message.user.addinfo.loginid.is.blank" />';
	}
	
	if(isNull($("#mobilePhone").val())){
		errorMsg += '\n'+'<spring:message code="message.user.addinfo.mobilephone.is.blank" />';
	}
	
	if(isNull($("#emailAddress").val())){
		errorMsg += '\n'+'<spring:message code="message.user.addinfo.emailaddress.is.blank" />';
	}
	if(errorMsg != ""){
		alert(errorMsg);
		return;
	}else{
		$('#editForm').attr("action","/user/${type}/editSubmit");
		$('#editForm').submit();
	}
}

function goBack(){
	$('#editForm').attr("action","/user/${type}/list");
	$('#editForm').submit();
}
</script>

</head>

<body>
<form  method="post" id="editForm">
<input type="hidden" id="userId" name="userId" value="<c:out value="${userInfoVO.userId}"/>" />  
<table border="1">
	<tr><td >修改用户信息</td></tr>
	<tr><td>用户名:</td><td><input id="loginId" name="loginId" type="text" value="<c:out value="${loginId}"/>" readOnly></td></tr>
	<tr><td>真实姓名:</td><td><input id="username" name="username" type="text" value="<c:out value="${userInfoVO.username}"/>" readOnly></td></tr>
	<tr><td>所属用户组:</td>
	<td>
	<select id="groupId" name="groupId">
		<c:forEach var="groupInfoVO" items="${groupInfoVOList}" >
			<option value="<c:out value="${groupInfoVO.groupId}" />" <c:out value="${groupInfoVO.groupId==groupId ? 'selected':''}"/> ><c:out value='${groupInfoVO.groupName}'/></option>
		</c:forEach> 
	</select>
	</td></tr>
	
	<tr><td>手机号码:</td><td><input id="mobilePhone" name="mobilePhone" type="text" value="<c:out value="${userInfoVO.mobilePhone}"/>" /> </td></tr>
	<tr><td>办公电话:</td><td><input id="officePhone" name="officePhone" type="text" value="<c:out value="${userInfoVO.officePhone}"/>" /> </td></tr>
	<tr><td>办公传真:</td><td><input id="officeFax" name="officeFax" type="text" value="<c:out value="${userInfoVO.officeFax}"/>" /> </td></tr>
	<tr><td>电子邮箱:</td><td><input id="emailAddress" name="emailAddress" type="text" value="<c:out value="${userInfoVO.emailAddress}"/> "/> </td></tr>
	<tr><td>IM即时通讯:</td><td><input id="im" name="im" type="text" value="<c:out value="${userInfoVO.im}"/>"  /> </td></tr>
	<tr><td>备注:</td><td><textarea id="memo" name="memo" ><c:out value="${userInfoVO.memo}"/></textarea></td></tr>
	<tr><td><input type="button" value="确定" onclick="javascript:eidtUserInfo();"/><input type="button" value="取消" onclick="javascript:goBack();"/></td></tr>
</table>

</form>

</body>

</html>
